package Anmail;

public class text3 {
    public static void main(String[] args){
        Cat cat=new Cat();
        cat.name="加菲猫";
       Dog dog=new Dog();
       dog.name="旺仔";
       dog.paly();//验证子类是否继承父类的方法了；
       cat.play();
       dog.eat();
    }
}
